package com.by.common.bean;

import com.by.common.group.ISave;
import com.by.common.group.IUpdate;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotEmpty;

/**
 * @author HY
 * @version 1.0
 * @description
 * @date 2025/2/14
 * @since JDK21
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel("登录参数")
public class Login {
    @ApiModelProperty(value = "用户名不能为空",required = true)
    @NotEmpty(message = "用户名不能为空！",groups = {ISave.class, IUpdate.class})
    String username;
    @ApiModelProperty(value = "密码不能为空",required = true)
    @NotEmpty(message = "密码不能为空！",groups = {ISave.class, IUpdate.class})
    String password;
}
